/**
 * Implementacion de la clase ControlConfigItem.
 */

#include <string>
#include "controlConfigItem.hpp"

ControlConfigItem::ControlConfigItem(){}

ControlConfigItem::~ControlConfigItem(){}

std::string ControlConfigItem::getConfigItemId()
{
	return this->itemId;
}

void ControlConfigItem::setConfigItemId(std::string id)
{
	this->itemId.clear();
	this->itemId = id;
	this->status[0] = 1;
}

std::string ControlConfigItem::getValue()
{
	return this->value;
}

void ControlConfigItem::setValue(std::string value)
{
	this->value.clear();
	this->value = value;
	this->status[1] = 1;
}

int ControlConfigItem::getConfigItemIdStatus()
{
	return this->status[0];
}

int ControlConfigItem::getValueStatus()
{
	return this->status[1];
}

int ControlConfigItem::getNumberOfFieldsStatus()
{
	return this->status[2];
}

void ControlConfigItem::setFailStatus(int fieldNumber)
{
	this->status[fieldNumber-1] = 0;
}

void ControlConfigItem::setSuccessStatus(int fieldNumber)
{
	this->status[fieldNumber-1] = 1;
}

void ControlConfigItem::clear()
{
	this->itemId.clear();
	this->value.clear();
	for (int i = 0; i < CONFIGITEM_STATUS_LEN; i++)
	{
		this->status[i] = 0;
	}
}
